/*
 *
 *
 *
 *
 */

package com.usefullc.user.domain;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.usefullc.system.entity.BaseEntity;
import com.usefullc.system.service.component.extend.DictField;
import com.usefullc.system.service.component.extend.EnumField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.Date;
import java.util.List;

@JsonIgnoreProperties(value = {"roleList","delState","pwd","payPwd"})
@ApiModel("用户")
@TableName("u_user")
@Data
public class User extends BaseEntity {


    @ApiModelProperty(notes = "账号/用户名")
    private String accountNo;

    @ApiModelProperty(notes = "密码")
    private String pwd;

    @ApiModelProperty(notes = "昵称")
    private String nickname;

    @ApiModelProperty(notes = "类型")
    private Integer type;


    @EnumField(value = "userStatusEnum")
    @ApiModelProperty(notes = "状态")
    @TableField(value = "`status`")
    private Integer status;

    @ApiModelProperty(notes = "微信")
    private String wechat;

    @ApiModelProperty(notes = "国家区号")
    private String areaCode;

    @ApiModelProperty(notes = "手机")
    private String mobile;

    @ApiModelProperty(notes = "邮件")
    private String email;

    @EnumField(value = "userGenderEnum")
    @ApiModelProperty(notes = "性别")
    private Integer gender;

    @ApiModelProperty(notes = "生日")
    private Date birthday;

    @ApiModelProperty(notes = "宣言")
    private String message;

    @ApiModelProperty(notes = "头像")
    private String avatar;


    @ApiModelProperty(notes = "描述")
    @TableField(value = "`desc`")
    private String desc;

    @ApiModelProperty(notes = "支付密码")
    private String payPwd;

    @ApiModelProperty(notes = "用户地址")
    private String address;


    @ApiModelProperty(notes = "用户姓名")
    private String userName;


    @DictField(value="career")
    @ApiModelProperty(notes = "职业")
    private String career;


    @ApiModelProperty(notes = "邀请码")
    private String inviteCode;

    @ApiModelProperty(notes = "别人的邀请码")
    private String shareInviteCode;

    private String local;

    @ApiModelProperty(notes = "第三方用户ID")
    private String otherUserId;
    @JSONField(serialize = false)
    @ApiModelProperty(notes = "角色")
    @TableField(exist = false)
    private List<Role> roleList;

//    @JSONField(serialize = false)
//    @ApiModelProperty(notes = "部门")
//    @TableField(exist = false)
//    private Dept dept;

    @ApiModelProperty(notes = "部门ID")
    private Long deptId;

//    @JSONField(serialize = false)
//    @ApiModelProperty(notes = "职位")
//    @TableField(exist = false)
//    private Position position;

    @ApiModelProperty(notes = "职位ID")
    private Long positionId;

    public User() {
    }


}
